#pragma once

#include "ConsolePrerequisites.h"

CCommandDictionary & GetConsleDictionary();

//////////////////////////////////////////////////////////////////////////

struct SConsFunc
{
	SConsFunc( const csString & strName, FuncExecCallback *pFunc, 
		const csString & strHelp = "unknown command." );
};

//////////////////////////////////////////////////////////////////////////

struct SConsVar
{
	SConsVar(	const std::string & strName, IValue & rValue, 
		const std::string & strHelp = "unknown command." );
};

//////////////////////////////////////////////////////////////////////////

struct SConsAlias
{
	SConsAlias( const csString & strAliasName, const csString & strCommandName );
};

//////////////////////////////////////////////////////////////////////////





#define _CONCAT(x, y)	x##y
#define CONCAT(x, y)	_CONCAT(x, y)
#define ANON_VAR		CONCAT( _console_command_, __COUNTER__ )

#define CONSOLE_FUNCTION( cmd, pfunc, desc )	static SConsFunc ANON_VAR( cmd, pfunc, desc )
#define CONSOLE_VARIABLE( cmd, rvalue, desc )	static SConsVar ANON_VAR( cmd, rvalue, desc )
#define CONSOLE_ALIAS( cmd, origin_cmd )		static SConsAlias ANON_VAR( cmd, origin_cmd )




